package com.xsqf.jt808.common.vo.resp;

import com.xsqf.jt808.common.config.DataType;
import com.xsqf.jt808.common.config.Property;
import com.xsqf.jt808.common.vo.DataPacket;
import com.xsqf.jt808.common.vo.req.server.TerminalParameter;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;

import java.util.List;

/**
 * ParameterQueryReply
 * 查询终端参数/查询指定终端参数应答
 * @author
 * @date 2020/5/26 15:57
 */
//@Data
@ApiModel(value = "查询终端参数/查询指定终端参数应答")
public class ParameterQueryReply extends DataPacket {

    @ApiModelProperty(value = "应答流水号")
    private Integer flowId;

    @ApiModelProperty(value = "应答参数个数")
    private Integer total;

    @ApiModelProperty(value = "参数项列表")
    private List<TerminalParameter> terminalParameters;

    @Property(index = 0, type = DataType.WORD, desc = "应答流水号")
    public Integer getFlowId() {
        return flowId;
    }

    public void setFlowId(Integer flowId) {
        this.flowId = flowId;
    }

    @Property(index = 2, type = DataType.BYTE, desc = "应答参数个数")
    public Integer getTotal() {
        return total;
    }

    public void setTotal(Integer total) {
        this.total = total;
    }

    @Property(index = 3, type = DataType.LIST, desc = "参数项列表")
    public List<TerminalParameter> getTerminalParameters() {
        return terminalParameters;
    }

    public void setTerminalParameters(List<TerminalParameter> terminalParameters) {
        this.terminalParameters = terminalParameters;
    }

//    public ParameterQueryReply(ByteBuf byteBuf) {
//        super(byteBuf);
//    }

//    @Override
//    public void parseBody() {
//        ByteBuf bb = this.payload;
//        this.setFlowId(bb.readInt());
//        this.setTotal(bb.readInt());
////        this.setTerminalParameters(readString(tota);
//
//    }



}
